package com.qiche.common

import com.qiche.conf.Configuration
import org.apache.spark.sql.SparkSession
import org.slf4j.{Logger, LoggerFactory}

class SparkBase extends Configuration {
  @transient
  protected val log: Logger = LoggerFactory.getLogger(this.getClass)


  def getContextLocal(name: String): SparkSession =
    SparkSession.builder()
      .appName("LoyaltyOwner")
      .master("local[*]")
//      .config("spark.sql.warehouse.dir", "hdfs://cdh01:8020/data/hive/warehouse")
      .enableHiveSupport()
      .getOrCreate()


}
